package com.definity.toolkit.web.taglib;

import javax.servlet.jsp.JspException;

public class AutoCompleteTag extends ComponentFormTag {

	private static final long serialVersionUID = 5461425511533231264L;

	private String url;
	
	public AutoCompleteTag() {

	}
	
	public void setUrl(String url) {
		this.url = url;
	}
	
	@Override
	protected String getComponentName() {
		return "autoComplete";
	}

	@Override
	protected String createStartTag(String name, String id, Object value) throws JspException {
		return "<input type=\"text\" " + createStyleClass("common_field", "autocomplete") + " id=\"" + id + "\" name=\"" + id + "\" url=\"" + url + "\" value=\"" + valueToString(value) + "\" />";
	}

	@Override
	protected String createEndTag(String name, String id, Object value) throws JspException {
		return null;
	}

}
